<!DOCTYPE html>
<%@ include file="../base.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<link href="${ctx}/assets/images/favicon.ico" mce_href="images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<title>我的会员卡</title>
<%@ include file="../js.jsp"%>
</head>
<body ontouchstart>
	<%@ include file="../top.jsp"%>
	<div class="page-relative skin-blue">
            <h3 class="text-center text-white padding-t-20">微信会员</h3>
            <div class="code-container">
                <div class="bd">
                    <div class="wechat-info">
                        <div class="wechat-avatar">
                        <img src="${userInfo.headimgurl}" />
                    </div>
                    <div class="wechat-name">
                        <p>${member.memberName}</p>
                    </div>
                </div>
               <img class="bar-code" src="${ctx}/member/barCode?phoneNum=${member.phoneNum}" />
            </div>
			<div class="bd text-center">
                    <div class="share-info">
                        <div class="share-icon">
                            <img src="${ctx}/assets/images/wechat.png" />
                        </div>
                        <div class="share-icon">
                            <img src="${ctx}/assets/images/friend-circle.png" />
                        </div>
                        <a>分享给更多的朋友吧！</a>
                    </div>
                </div>
		</div>
		
        <!--BEGIN dialog-->
        <div class="weui_dialog_alert" id="dialog" style="display: none;">
            <div class="weui_mask"></div>
            <img class="share-hint" src="${ctx}/assets/images/share-hint.png" />
        </div>
        <!--END dialog-->
		
		<div class="push"></div>
	</div>
	
	<div class="footer-relative text-white bg-blue">
        <span>本服务由</span>
        <img src="${ctx}/assets/images/logo.png" title="油掌柜" />
        <span>提供技术支持</span>
    </div>
</body>
<script>
        $(function () {
            $('.share-info').click(function() {
                var $dialog = $('#dialog');
                $dialog.show();
                $dialog.find('.weui_mask, .share-hint').on('click', function () {
                    $dialog.hide();
                });
            });
        });
</script>
<script type="text/javascript">
var desc = '您的朋友正在邀请您注册成为';
wx.ready(function(){
	
  	wx.onMenuShareTimeline({
			title : '邀请注册',
			link : '${ctx}'.concat('/tencent/weixinShare?stationId=','${stationId}'),
			imgUrl : '${ctx}'.concat('/assets/images/oil-logo_32.png'),
		trigger: function (res) {
      	},
		success : function() {
		},
		cancel : function() {
		},
		fail: function (res) {
      	}
	});
  	
  	 wx.onMenuShareAppMessage({
	      title: '邀请注册',
	      desc: desc.concat('【${hqName}】的会员，快来享受更多优惠吧！'),
	      link: '${ctx}'.concat('/tencent/weixinShare?stationId=','${stationId}'),
	      imgUrl: '${ctx}'.concat('/assets/images/oil-logo_32.png'),
	      trigger: function (res) {
	      	},
			success : function() {
			},
			cancel : function() {
			},
			fail: function (res) {
	      	}
    });
});

</script>
</html>